
rm(list=ls())
## load results
load("Eisner/res_eisner.RData")
load("Bordbar/res_bordbar.RData")
load("Taware/res_taware.RData")
load("Al-Mutawa/res_almutawa.RData")

### =================================================================================================
## Eisner
### =================================================================================================
res = matrix(0,5,5)
res_update = res_eisner[c("ctgt", "ctst","sh", "fl", "dag")]

for(i in 1:5){
  for(j in i:5){
    res[j,i] = sum(duplicated(c(res_update[[i]],res_update[[j]]) ) )
  }
  
}
diag(res) = c(length(res_update$ctgt),
              length(res_update$ctst),
              length(res_update$sh),
              length(res_update$fl),
              length(res_update$dag))
rownames(res ) = c("ctgt", "ctst", "sh", "fl","dag")
colnames(res) = c("ctgt", "ctst", "sh", "fl","dag")

res

### =================================================================================================
## Bordbar
### =================================================================================================
res = matrix(0,5,5)
res_update = res_bordbar[c("ctgt", "ctst", "fl", "dag","sh")]

for(i in 1:5){
  for(j in i:5){
    res[j,i] = sum(duplicated(c(res_update[[i]],res_update[[j]]) ) )
  }
  
}
diag(res) = c(length(res_update$ctgt),
              length(res_update$ctst),
              length(res_update$fl),
              length(res_update$dag),
              length(res_update$sh))
rownames(res ) = c("ctgt", "ctst", "fl", "dag","sh")
colnames(res) = c("ctgt", "ctst", "fl", "dag","sh")

res

### =================================================================================================
## Taware
### =================================================================================================
res = matrix(0,5,5)
res_update = res_taware[c( "dag","sh", "ctst", "fl",  "ctgt")]

for(i in 1:5){
  for(j in i:5){
    res[j,i] = sum(duplicated(c(res_update[[i]],res_update[[j]]) ) )
  }
  
}
diag(res) = c(length(res_update$dag),
              length(res_update$sh),
              length(res_update$ctst),
              length(res_update$fl),
              length(res_update$ctgt) )
rownames(res ) = c( "dag","sh", "ctst", "fl",  "ctgt")
colnames(res) = c( "dag","sh", "ctst", "fl",  "ctgt")
res


### =================================================================================================
## Al-Mutawa
### =================================================================================================
res = matrix(0,5,5)
res_update = res_almutawa[c( "ctst","sh", "dag", "fl",  "ctgt")]

for(i in 1:5){
  for(j in i:5){
    res[j,i] = sum(duplicated(c(res_update[[i]],res_update[[j]]) ) )
  }
  
}
diag(res) = c(length(res_update$ctst),
              length(res_update$sh),
              length(res_update$dag),
              length(res_update$fl),
              length(res_update$ctgt) )
rownames(res ) = c( "ctst","sh", "dag", "fl",  "ctgt")
colnames(res) = c( "ctst","sh", "dag", "fl",  "ctgt")

res





